home *** CD-ROM | disk | FTP | other *** search
- // CopyDlg.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "VCDemo.h"
- #include "CopyDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CCopyDlg dialog
-
-
- CCopyDlg::CCopyDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CCopyDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CCopyDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
-
-
- void CCopyDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CCopyDlg)
- DDX_Control(pDX, IDC_SGCTRL1, m_ctrl);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CCopyDlg, CDialog)
- //{{AFX_MSG_MAP(CCopyDlg)
- ON_BN_CLICKED(IDC_BUTTON_COPY, OnButtonCopy)
- ON_BN_CLICKED(IDC_BUTTON_CUT, OnButtonCut)
- ON_BN_CLICKED(IDC_BUTTON_PASTE, OnButtonPaste)
- ON_BN_CLICKED(IDC_BUTTON_PASTESAMESIZE, OnButtonPastesamesize)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CCopyDlg message handlers
-
- void CCopyDlg::OnButtonCopy()
- {
- // TODO: Add your control notification handler code here
- m_ctrl.DoCopySelected();
- }
-
- void CCopyDlg::OnButtonCut()
- {
- // TODO: Add your control notification handler code here
- m_ctrl.DoCutSelected();
- }
-
- void CCopyDlg::OnButtonPaste()
- {
- // TODO: Add your control notification handler code here
- m_ctrl.DoPaste( m_ctrl.DoGetCurrentCol(), m_ctrl.DoGetCurrentRow(), FALSE);
- }
-
-
- void CCopyDlg::OnButtonPastesamesize()
- {
- // TODO: Add your control notification handler code here
- m_ctrl.DoPaste( m_ctrl.DoGetCurrentCol(), m_ctrl.DoGetCurrentRow(), TRUE );
- }
-
- BOOL CCopyDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- m_ctrl.SetPageLabelVisible( FALSE );
- COleVariant var( "VCDEMO" );
- m_ctrl.DoSetMessageTitle( var );
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
-